<template>
  <div class="dashboard-container">
    <!-- 用户信息卡片 -->
    <div class="user-info-section">
      <UserInfoCard :user-info="userInfo" />
    </div>
  </div>
</template>

<script lang="ts" setup>
import { ref, onMounted } from 'vue'
import UserInfoCard from '../components/UserInfoCard.vue'

const userInfo = ref<any>(null)

// 获取用户信息
const getUserInfo = () => {
  const userInfoStr = localStorage.getItem('userInfo')
  if (userInfoStr) {
    userInfo.value = JSON.parse(userInfoStr)
  }
}

onMounted(() => {
  getUserInfo()
})
</script>

<style scoped>
.dashboard-container {
  min-height: 100vh;
  width: 100vw;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0;
  margin: 0;
}

.user-info-section {
  width: 75%;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 24px;
  box-sizing: border-box;
}

@media (max-width: 700px) {
  .user-info-section {
    margin: 8px 0 0 0;
  }
}
</style>